package com.tg.demo.seata.order.feign;

import com.tg.demo.common.util.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Rubble
 * Created on 2020/5/26
 */
@FeignClient(value = "seata-storage")
public interface StorageFeignClient {

    /**
     * 扣库存
     * @param id
     * @param count
     * @return
     */
    @PostMapping("/storage/seataStorage/deductStorage")
    CommonResult deductStorage(@RequestParam("id") Integer id, @RequestParam("count") Integer count);

}
